// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import Vant from 'vant'
import components from './components/'


import './assets/scss/main.scss';

import methods from './util/addMethods';

import 'vant/lib/vant-css/index.css';


Vue.use(methods);
Vue.use(Vant);

Vue.config.productionTip = false
Vue.prototype.$http = axios

Object.keys(components).forEach(key => {
    var name = key.replace(/(\w)/, (v) => v.toUpperCase()); //首字母大写
    Vue.component(`v${name}`, components[key]);
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})
